﻿using System;
using System.Configuration;
using Acidaes.Caching;
using CachingTest;


public partial class Default2 : System.Web.UI.Page
{
    

    protected void Page_Load(object sender, EventArgs e)
    {
    
        

        OrderDesc.Enabled = false;
        OrderAmt.Enabled = false;
        OrderQuant.Enabled = false;
    }

    protected void GetOrder_Click(object sender, EventArgs e)
    {
        

      try
      {

          Order order = (Order) (new CacheClient().Get(OrderId.Text));
         
        if (order == null)
        {
          GetResult.Text = "Order " + OrderId.Text + " not found";
        }
        else
        {
          OrderDesc.Text = order.Description;
          OrderAmt.Text = order.Amount;
          OrderQuant.Text = order.Quantity.ToString();
        }
      }
      catch (Exception e1)
      {
        GetResult.Text = "Exception " + e1.Message;
      }
    }
}
